﻿using AppService.IService.System_operation;
using Domain.Entity.System_operation;
using Domain.IRepository.Basic_information;
using Domain.IRepository.System_operation;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace AppService.Service.System_operation
{
    [Dependency(ServiceLifetime.Scoped)]
    public class Arrival_meterService : IArrival_meterService
    {
        private readonly IArrival_meterRepository ar_Repository;

        public Arrival_meterService(IArrival_meterRepository ArRepository)
        {
            this.ar_Repository = ArRepository;
        }

        public List<Arrival_meter> Arrival_condition(string? RealityGet_time, string? value2, string? Origin_place, string? Det_place, int currentPage, int PageSize)
        {
            return ar_Repository.Arrival_condition(RealityGet_time, value2,Origin_place , Det_place, currentPage, PageSize);
        }

        public int Count(string? RealityGet_time, string? value2, string? Origin_place, string? Det_place)
        {
            return ar_Repository.Count(RealityGet_time, value2,Origin_place,Det_place);
        }

        public bool DDArrival(int id)
        {
            return ar_Repository.DDArrival(id);
        }

        public List<Arrival_meter> GetArrival_meters(int currentPage, int PageSize)
        {
            return ar_Repository.GetArrival_meters().Skip((currentPage - 1) * PageSize).Take(PageSize).ToList();
        }

        public Bill_ol GetBillId(int id)
        {
            return ar_Repository.GetBillId(id);
        }

        public bool ZCArrival(string Wb_number)
        {
            return ar_Repository.ZCArrival(Wb_number);
        }
    }
}
